<template>
    <el-container>
      <el-main>
        <div>
          <el-carousel>
            <el-carousel-item v-for="item in  imgWrap" :key="item.url">
              <img :src="item.url"/>
            </el-carousel-item>
          </el-carousel>
        </div>
        <el-divider></el-divider>
          <HotCity/>
        <el-divider></el-divider>
        <h3>推荐游记</h3>
        <div>
            <ArticleItem></ArticleItem>
        </div>
      </el-main>
    </el-container>
</template>

<script>
import request from "@/utils/request";
import Article from "@/views/front/Article";
import ArticleItem from "@/components/article/ArticleItem";
import HotCity from "@/views/front/city/HotCity";
export default {
  name: "FrontHome",
  components: {Article,ArticleItem,HotCity},
  data() {
    return {
      bannerHeight: 200,
      imgWrap:[
        {url:require("../../assets/img/pic1.jpg")},
        {url:require("../../assets/img/pic2.jpg")}
      ],
      articles:[

      ]
    }
  },
  methods: {
    //请求游记数据
    load() {
      request.get("/article/all").then(res => {
        console.log(res)
        this.articles=res
      })
    }
  },
  created() {
    this.load()
  },



}
</script>

<style>

</style>
